﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:gd="clr-namespace:WickedFlame.GenDock">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/VecDraw.GenDock;component/Resources/Brushes.xaml"/>
        <ResourceDictionary Source="/VecDraw.GenDock;component/Resources/Common.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    
    <!--DockingLayoutManager-->
    <Style TargetType="{x:Type gd:DockingLayoutManager}">
        <Setter Property="Background" Value="{DynamicResource {ComponentResourceKey {x:Type gd:DockingLayoutManager}, {x:Static gd:GenDockBrushes.DefaultBackgroundBrush}}}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="AllowDrop" Value="true"/>
        <Setter Property="Control.Template">
            <Setter.Value>
                
                <ControlTemplate TargetType="{x:Type gd:DockingLayoutManager}">
                    <Grid
                        Background="{TemplateBinding Background}"
                        >                        
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                        </Grid.RowDefinitions>

                        <Border Grid.Column="0" Grid.Row="0" BorderBrush="Black" BorderThickness="1" >
                            <StackPanel Name="PART_LeftAnchorTabPanel"
                                    Background="{DynamicResource {ComponentResourceKey {x:Type gd:DockingLayoutManager}, {x:Static gd:GenDockBrushes.AnchorBackgroundBrush}}}">
                                <Border Background="{DynamicResource {ComponentResourceKey {x:Type gd:DockingLayoutManager}, {x:Static gd:GenDockBrushes.PaneHeaderDarkBrush}}}" 
                                        Height="15">
                                    <Button Grid.Row="0" x:Name="btnHideLeft" HorizontalAlignment="Right" Width="15" Height="15" Style="{StaticResource PaneHeaderCommandStyle}" >
                                        <!--Command="gd:DockablePanel.ToggleAutoHideCommand" -->
                                        <Image Source="Images\PinArrowRight.png" Width="13" Height="13" Stretch="None"/>
                                    </Button>
                                </Border>

                            </StackPanel>
                        </Border>
                        
                        <Border Grid.Column="2" Grid.Row="0" BorderBrush="Black" BorderThickness="1">
                            <StackPanel Name="PART_RightAnchorTabPanel" 
                                     Background="{DynamicResource {ComponentResourceKey {x:Type gd:DockingLayoutManager}, {x:Static gd:GenDockBrushes.AnchorBackgroundBrush}}}">
                                <Border Background="{DynamicResource {ComponentResourceKey {x:Type gd:DockingLayoutManager}, {x:Static gd:GenDockBrushes.PaneHeaderDarkBrush}}}" 
                                        Height="15">
                                    <Button Grid.Row="0" x:Name="btnPinAutoHideRight" HorizontalAlignment="Left" Width="15" Height="15" Style="{StaticResource PaneHeaderCommandStyle}" >
                                        <!--Command="gd:DockablePanel.ToggleAutoHideCommand" -->
                                        <Image Source="Images\PinArrowLeft.png" Width="13" Height="13" Stretch="None"/>
                                    </Button>
                                </Border>
                            </StackPanel>
                        </Border>                        
                        
                        <ContentPresenter Grid.Column="1" Grid.Row="0"/>
                        
                        <!--<gd:ButtonAnchor Grid.Column="1">
                            
                        </gd:ButtonAnchor>-->
                                                
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="LeftAnchorType">
                            <Trigger.Value>
                                <gd:AnchorType>
                                    None
                                </gd:AnchorType>
                            </Trigger.Value>
                            
                            <Setter Property="Visibility"
									Value="Collapsed" TargetName="PART_LeftAnchorTabPanel"/>
                        </Trigger>
                        <Trigger Property="RightAnchorType">
                            <Trigger.Value>
                                <gd:AnchorType>
                                    None
                                </gd:AnchorType>
                            </Trigger.Value>

                            <Setter Property="Visibility"
									Value="Collapsed" TargetName="PART_RightAnchorTabPanel"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                    
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
</ResourceDictionary>